//
//  ILGSharedInstance.m
//  ILGDemo
//
//  Created by happy on 2020/4/14.
//  Copyright © 2020 Happy. All rights reserved.
//

#import "ILGSharedInstance.h"

@implementation ILGSharedInstance

static ILGSharedInstance *_instance = nil;
+ (instancetype)sharedInstance
{
    if (_instance == nil) {
        _instance = [[self alloc] init];
    }
    
    return _instance;
}

+ (instancetype)allocWithZone:(struct _NSZone *)zone {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _instance = [super allocWithZone:zone];
    });
    
    return _instance;
}

- (id)copyWithZone:(NSZone *)zone {
    return _instance;
}

- (id)mutableCopyWithZone:(NSZone *)zone {
    return _instance;
}

@end
